$.ajax({
	type:"get",
	url:"http://www.handsomemao.online/www/php/skill.php",
	async:true,
	dataType:'json',
    success:function(data){
    	var html = "";
            for(var i=0;i<data.length;i++){
                html +='<li class="mui-table-view-cell"><a href="javascript:;" class="skill">' +data[i].level+ data[i].name + data[i].category+'</a></li>';

            }
            $(".mui-table-view-chevron").html(html);
    },
    fail:function(xhr,err){
    	console.log(err)
    }
});
$.ajax({
	type:"get",
	url:"http://www.handsomemao.online/www/php/work.php",
	async:true,
	dataType:'json',
    success:function(data){
            for(var i=0;i<data.length;i++){
            	var html = "";
                html +='<div class="mui-card-header mui-card-media" style="height:40vw;background-image:url('+data[i].image+')"></div>';
                html+='<div class="mui-card-content">'
                		+'<div class="mui-card-content-inner">'
                		+'<p>'+data[i].category+'&nbsp&nbsp'+data[i].name+'</p>'
                		+'<p style="color: #333;">'+data[i].projects+'</p>'
                		+'</div>'
            			+'</div>'
            			+'<div class="mui-card-footer">'
            			+'<a class="mui-card-link">'+data[i].posts+data[i].reportto+'</a>'
            			+'<a class="mui-card-link">企业人数:'+data[i].peoples+'</a>'
            			+'</div>'
				 $(".mui-card").eq(i+1).html(html);
            }
           
    },
    fail:function(xhr,err){
    	console.log(err)
    }
});

$.ajax({
	type:"get",
	url:"http://www.handsomemao.online/www/php/project.php",
	async:true,
	dataType:'json',
    success:function(data){
    	var html = "";
            for(var i=0;i<data.length;i++){
                	html+='<li class="mui-table-view-cell mui-media">'
                		+'<a href="javascript:;">'
                		+'<img class="mui-media-object mui-pull-left" src="'+data[i].image+'">'
                		+'<div class="mui-media-body">'
                		+data[i].name+'&nbsp:&nbsp'+data[i].category
                		+'<p class="project">'+data[i].description+'<br/><br/>'+data[i].detail+'<br/><br/>'+'主要应用：'+data[i].tech+'</p>'
                		+'</div>'
                		+'</a>'
                		+'</li>';
            }
           $(".mui-table-view").eq(1).html(html);
    },
    fail:function(xhr,err){
    	console.log(err)
    }
});

$.ajax({
	type:"get",
	url:"http://www.handsomemao.online/www/php/me.php",
	async:true,
	dataType:'json',
    success:function(data){
    	var html = "<p>这是我大学时期和工作时的一些照片</p>";
            for(var i=0;i<data.length;i++){
                	html+=''
                			+'<p><img src="'+data[i].image+'" data-preview-src="" data-preview-group="1" /></p>'	
                			+'<p>'+data[i].font+'</p>';

            }
           $(".mui-content-padded").html(html);
           
          
    },
    fail:function(xhr,err){
    	console.log(err)
    }
});
$('.mui-bar-nav a').eq(0).click(function(){
	var width = $(window).width();
	var height=$(window).height();
	$('#bcid').css({width:width,height:height});
	$('.canel_select').show();
	$('.mui-content').hide();
	$('#bcid').show();
	startRecognize();
	$('.canel_select').click(function(){
		scan.close();
		$('.canel_select').hide();
		$('#bcid').hide();
		$('.mui-content').show();
	})
	
})
